<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>宝，七夕快乐</title>
    <style>
        * ,body{
            margin: 0;
            padding: 0;
        }
        body{
            background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
            /*background-image: linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);*/
            /*background-image: linear-gradient(to top, #fdcbf1 0%, #fdcbf1 1%, #e6dee9 100%);*/
            /*background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);*/
            /*background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%);*/
            /*background-image: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);*/
            /*background-image: linear-gradient(180deg, #2af598 0%, #009efd 100%);*/
            /*background-image: linear-gradient(15deg, #13547a 0%, #80d0c7 100%);*/
            overflow: hidden;
            width: 100%;
            height: 100vh;
        }
        canvas {
            width: 100%;
            height: 100%;

        }
    </style>
</head>
<body id="main">
<canvas id="canvas"></canvas>
<script src="fullLove.js"></script>
<audio src="bmg.flac" id="bgm" loop="loop"></audio>
<script>
    window.onload=function (){
        let canvas = document.getElementById("canvas");
        let settings={
            num: 150,
            textList: [
                "免费",
                "定制",
                "有源码",
                "欢迎",
            ],
            images: [],
            flash:false
        };
        for (let i = 1; i < 17; i++) {
            // 添加本地图片地址
            settings.images.push("../images/m"+i+".png");
        }
        // 添加外部图片地址
        settings.images.push("https://rstyro.top/deerapi/show/template/20211129/fb695550b4b24014bdcd7d8628bf2ba0.jpg");
        let fullLove = new FullLove(canvas,settings);
        fullLove.init();

        // 点击屏幕播放背景音乐
        let main = document.getElementById('main');
        main.onclick=function (e){
            let bgm = document.getElementById("bgm");
            bgm.volume=0.1;
            bgm.play();
        }
    }
</script>
</body>
</html>
